﻿using Super_Management_Mayhem.Content.Spritesheet;
using Transformable_Engine_v2.Engine.Animation.ColorAnimation;
using Transformable_Engine_v2.Engine.Animation.PositionAnimation;
using Transformable_Engine_v2.Engine.Animation.RotationAnimation;
using Transformable_Engine_v2.Engine.Animation.ScaleAnimation;
using Transformable_Engine_v2.Engine.Animation.Trajectory;
using Transformable_Engine_v2.Engine.GameObjects.Containers;
using Transformable_Engine_v2.Engine.Graphics;
using Transformable_Engine_v2.Engine.Helper;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Super_Management_Mayhem.Screens.Playing.Particle.Smoke
{
    public class Smoke : ImageContainer
    {
         public Smoke(TE_Vector2 position)
         {
             Position = position;
             Sprite = ParticleSheet.GetSprite(ParticleSheet.Explosion.SmokeInside);
             Origin = TE_Rectangle.Alignment.CenterMiddle;
             Rotation = Randomizer.Double().TimesTwoPi();
             Color = new Color(Color.White, 200);
             Scale = new TE_Vector2(0.5f, 0.5f);

             AddAnimations(new PositionUniformLinearAnimation(0, new TE_Vector2(0, -4), new TE_Vector2(0, -1)));
             AddAnimations(new RotationUniformLinearAnimation(0, 2));
             AddAnimations(new ScaleUniformLinearAnimation(0, new TE_Vector2(1.5f, 1.5f)));
             AddAnimations(new ColorAnimation(new LinearEasing(), Color.Transparent, 1000, false, 0));

             Die(1000);
         }
    }
}